//
//  ST_TIANRouteMonitor.swift
//  btvideo
//
//  Created by Jason on 2022/3/1.
//  Copyright © 2022 JarvanZhang. All rights reserved.
//

import UIKit
import RxCocoa
import RxSwift


enum ST_TIANPushStatus {
    
    case will(type:RouteActionType,value:RouteValue)
    case finished(type:RouteActionType,value:RouteValue)
    
    
    
    struct RouteValue {
        let form:UIViewController
        let to:UIViewController
    }
    
    enum RouteActionType {
        case present
        case dismiss
        case navigationPush
        case pop
    }
    
    var value:RouteValue{
        
        switch self {
        case .will(_, let value):
            return value
        case .finished(_, let value):
            return value
        }
    }
}


class ST_TIANRouteMonitor {
    
    static let `default` = ST_TIANRouteMonitor()
    
    
    let didChanged = PublishSubject<ST_TIANPushStatus>()
    
    private init(){}
    
    func start(){
        
        UIViewController.FWMethodSwizzling
        
        UINavigationController.nav_method_swizzling
        
    }

}
